package com.snake.util;

import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.Workbook;

public class ExcelUtil {
	// 大标题
	public CellStyle bigTitleStyle(Workbook wb) {
		CellStyle curStyle = wb.createCellStyle();
		Font curFont = wb.createFont();

		curFont.setFontHeightInPoints((short) 16);
		curFont.setFontName("宋体");
		curFont.setBoldweight(Font.BOLDWEIGHT_BOLD); // 字体加粗

		curStyle.setFont(curFont);

		curStyle.setAlignment(CellStyle.ALIGN_CENTER); // 横向居中
		curStyle.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 纵向居中

		return curStyle;
	}
}
